< previous page page_827 next page >

Page 827
There is very little code to add to this form. All the code you need for this form is found in Listing 21.29. Add this code to the frmRights form.
Type.gifListing 21.29. Coding the frmRights form.
Option Explicit

Private Sub cmdOK_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    '
    ' set rights button
    '
    optRights(frmUserMaint.intRights) = True
    '
End Sub

Private Sub optRights_Click(Index As Integer)
    '
    ' set rights level
    '
    frmUserMaint.intRights = Index
    '
End Sub
Now save this form as FRMRIGHTS.FRM. In the next section, you walk through a session of setting user rights and adding new secured objects to the database.
Running the Access Rights Maintenance Forms
After building the Access Rights forms, you are ready to test the project again. When you start the program, you are prompted to enter a password. As before, enter USERA for both the User ID and the Password. This brings up the User Maintenance form. First, add a new user, TEMPUSER. Be sure to include a password and a name. After saving the new user record, select the User Access tab to add user access rights. Your form should look similar to the one in Figure 21.7.
You can see a set of default access objects on the left of Figure 21.7, and you can see that the new user does not have any defined security levels for the objects in the box on the right. First, add one of the default objects to the user's list by clicking a row selector in the Secure Objects list (the Default List) and clicking the Add button. You see that the selected object has been copied to the User Access list with the default access rights setting (see Figure 21.8).

 
< previous page page_827 next page >

If you like this book, buy it!